/**
 * 
 */
package metalink.admin;

import java.util.ArrayList;

import model.admin.LibraryMo;

import vo.mixed.LibraryStudentVo;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Sony
 * 
 */
public class GetIssuedBooks extends ActionSupport {
	ArrayList<LibraryStudentVo> list;
	String view = "",yearfilter,coursefilter;

	public String execute() {

		GetIssuedBooks gib = new GetIssuedBooks();
		gib.setView(view);
		if (view.equals("issuedbooks")) {
			list = new ArrayList<LibraryStudentVo>();
			LibraryMo mo = new LibraryMo();
			list = mo.GetIssuedBookList("issuedbooks");
			return SUCCESS;
		} else if (view.equals("all")) {
			list = new ArrayList<LibraryStudentVo>();
			LibraryMo mo = new LibraryMo();
			list = mo.GetIssuedBookList("all");
			return SUCCESS;
		}
		else if(view.equals("filterissuedbooks"))
		{
			list = new ArrayList<LibraryStudentVo>();
			LibraryMo mo = new LibraryMo();
			list = mo.GetFilteredIssuedBookList(yearfilter,coursefilter);
			
		}
		return SUCCESS;
	}

	public String getView() {
		return view;
	}

	public void setView(String view) {
		this.view = view;
	}

	public ArrayList<LibraryStudentVo> getList() {
		return list;
	}

	public void setList(ArrayList<LibraryStudentVo> list) {
		this.list = list;
	}
}
